<div>
  <h2 id="page-heading" data-cy="TagHeading">
    <span jhiTranslate="blogApp.tag.home.title">Tags</span>

    <div class="d-flex justify-content-end">
      <button class="btn btn-info mr-2" (click)="reset()" [disabled]="isLoading">
        <fa-icon icon="sync" [spin]="isLoading"></fa-icon>
        <span jhiTranslate="blogApp.tag.home.refreshListLabel">Refresh List</span>
      </button>

      <button
        id="jh-create-entity"
        data-cy="entityCreateButton"
        class="btn btn-primary jh-create-entity create-tag"
        [routerLink]="['/tag/new']"
      >
        <fa-icon icon="plus"></fa-icon>
        <span jhiTranslate="blogApp.tag.home.createLabel"> Create a new Tag </span>
      </button>
    </div>
  </h2>

  <jhi-alert-error></jhi-alert-error>

  <jhi-alert></jhi-alert>

  <div class="alert alert-warning" id="no-result" *ngIf="tags?.length === 0">
    <span jhiTranslate="blogApp.tag.home.notFound">No tags found</span>
  </div>

  <div class="table-responsive" id="entities" *ngIf="tags && tags.length > 0">
    <table class="table table-striped" aria-describedby="page-heading">
      <thead>
        <tr jhiSort [(predicate)]="predicate" [(ascending)]="ascending" [callback]="reset.bind(this)">
          <th scope="col" jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon icon="sort"></fa-icon></th>
          <th scope="col" jhiSortBy="name"><span jhiTranslate="blogApp.tag.name">Name</span> <fa-icon icon="sort"></fa-icon></th>
          <th scope="col"></th>
        </tr>
      </thead>
      <tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
        <tr *ngFor="let tag of tags; trackBy: trackId" data-cy="entityTable">
          <td>
            <a [routerLink]="['/tag', tag.id, 'view']">{{ tag.id }}</a>
          </td>
          <td>{{ tag.name }}</td>
          <td class="text-right">
            <div class="btn-group">
              <button type="submit" [routerLink]="['/tag', tag.id, 'view']" class="btn btn-info btn-sm" data-cy="entityDetailsButton">
                <fa-icon icon="eye"></fa-icon>
                <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
              </button>

              <button type="submit" [routerLink]="['/tag', tag.id, 'edit']" class="btn btn-primary btn-sm" data-cy="entityEditButton">
                <fa-icon icon="pencil-alt"></fa-icon>
                <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
              </button>

              <button type="submit" (click)="delete(tag)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
                <fa-icon icon="times"></fa-icon>
                <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
              </button>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
